const OSS = require('ali-oss')
const fs = require('fs')
const base64js = require('./base64')
const oss = new OSS({
    accessKeyId: "LTAI5tGUK2ucD5xtyPd86f9k",
    accessKeySecret: "PcQKwHF6Fr4T7XnDjLxMkgIrDoiIpq",
    bucket: "happy-art",
    region: "oss-cn-shenzhen",
    endpoint: "oss-cn-shenzhen.aliyuncs.com",
  });
  const base64 = fs.readFileSync('./t0.txt').toString()
  const buffer = Buffer.from(base64.replace(/^data:image\/\w+;base64,/, ''), 'base64');

  // const buffer = Buffer.from(base64, 'base64');
  // new File()
  // const buffer = Buffer.from(base64, 'base64');
oss.put('ssss1.png', buffer)
console.log('oss',oss)